package com.maolong.controller.system;


import com.maolong.pojo.fuction.result.Result;
import com.maolong.pojo.vo.MenuVo;
import com.maolong.service.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "菜单管理")
@RestController
@RequestMapping("/menu")
public class MenuController {
    @Autowired
    MenuService menuService;

    /**
     * 获取菜单信息
     */
    @GetMapping
    @ApiOperation("获取菜单信息")
    public Result<List<MenuVo>> getMenus(){
        List<MenuVo> menuVos = menuService.selectMenus();
        return Result.success(menuVos);
    }
}
